public class Demo4 {
    public static void main(String[] args) {
        Thread t = new Thread(()->{
            // 返回当前线程对象的引用
            Thread cur = Thread.currentThread();
            System.out.println(cur.getName());
        },"A");

        t.start();

        Thread thread = Thread.currentThread();
        System.out.println(thread.getName());

    }
}
